Sub AutoGenIdxMenuTbl()
    On Error GoTo Tuichu
    Dim i As Integer
    Dim ShtCount As Integer
    Dim SelectionCell As Range
    ShtCount = Worksheets.Count
    If ShtCount = 0 Or ShtCount = 1 Then Exit Sub
    Application.ScreenUpdating = False
	' "目录"表放在最前面
    For i = 1 To ShtCount
        If Sheets(i).Name = "目录" Then
            Sheets("目录").Move Before:=Sheets(1)
        End If
    Next i
	
	'不存在"目录"页，在最前面加入sheet="目录"
    If Sheets(1).Name <> "目录" Then
        ShtCount = ShtCount + 1
        Sheets(1).Select
        Sheets.Add
        Sheets(1).Name = "目录"
        'Range("A1").Value = "旧大厅绩效业务数据信息汇总表"
    End If
    
    'Worksheets("Sheet1").Activate
    'Worksheets("Sheet1").Range("A26").Value = "Feng Liu"
    'Worksheets("Sheet1").Range("A26").ColumnWidth  = 30
    'Worksheets("Sheet1").Range("A26").RowHeight   = 30
    'Worksheets("Sheet1").Range("A26").Font.ColorIndex   = 3
    'Worksheets("Sheet1").Range("A26").Interior.ColorIndex   = 4
    
    'With Worksheets("Sheet1")
    '   .Activate
    '   .Range("A26").Value = "Feng Liu"
    '   .Range("A26").ColumnWidth  = 30
    '   .Range("A26").RowHeight   = 50
    '   .Range("A26").Font.ColorIndex   = 5
    '   .Range("A26").Interior.ColorIndex   = 6
    'End With
    
    'Worksheets("总纲").Activate
    'Worksheets("总纲").Range("A26", "A27").Value = "Feng Liu"
    'Worksheets("总纲").Range("A28", "A30").EntireRow.Value = "Feng Liu"
    'Worksheets("总纲").Range("A28", "A30").EntireRow.Interior.ThemeColor = 5
	'Worksheets("总纲").Range("A28:A30").EntireRow.Delete

    Worksheets("总纲").Activate
    Worksheets("总纲").Range("A26", "A27").Value = "Feng Liu"
	Worksheets("总纲").Range("A26").Clear

    With Worksheets("总纲")
       .Activate
       .Range("A28").Value = "Feng Liu"
       .Range("A28").ColumnWidth  = 30
       .Range("A28").RowHeight   = 50
       .Range("A28").Font.ColorIndex   = 5
       .Range("A28").Interior.ColorIndex   = 6
    End With
	'Worksheets("总纲").Range("A28").ClearFormats	
	'Worksheets("总纲").Range("A28").Copy Destination:=Range("A37")
	'Worksheets("总纲").Range("A26:A28").Copy Destination:=Range("A37")
	Worksheets("总纲").Range("A26:A28").Cut Destination:=Range("A37")
	Worksheets("总纲").Name = "我的总纲"

    
    Sheets("目录").Select
    Columns("B:B").Delete Shift:=xlToLeft
    Application.StatusBar = "正在生成目录…………请等待！"
    For i = 2 To ShtCount
        ActiveSheet.Hyperlinks.Add Anchor:=Worksheets("目录").Cells(i, 2), Address:="", SubAddress:= _
        Sheets(i).Name & "!R1C1", TextToDisplay:=Sheets(i).Name
    Next

    Sheets("目录").Select
    Columns("B:B").AutoFit
	'Columns("B:C").EntireColumn.Interior.ThemeColor = 8
    Cells(1, 2) = "目录"
    Set SelectionCell = Worksheets("目录").Range("B1")
    With SelectionCell
        .HorizontalAlignment = xlDistributed
        .VerticalAlignment = xlCenter
        .AddIndent = True
        .Font.Bold = True
        .Interior.ColorIndex = 34
    End With
    Application.StatusBar = False
    Application.ScreenUpdating = True
Tuichu:
End Sub








